package com.ddh.ddhsanguogame.controller;


import com.ddh.ddhsanguogame.common.BaseResponse;
import com.ddh.ddhsanguogame.common.DongResultUtils;
import com.ddh.ddhsanguogame.dto.CardAllianceDTO;
import com.ddh.ddhsanguogame.service.ICardAllianceService;
import com.ddh.ddhsanguogame.service.ICardMessageService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * <p>
 * 同盟信息表 前端控制器
 * </p>
 *
 * @author ddh
 * @since 2025-06-30
 */
@RestController
@RequestMapping("/card-alliance")
@Api(tags = "同盟信息表")
public class CardAllianceController {
    @Resource
    private ICardAllianceService cardAllianceService;

    /**
     * 创建或者加入同盟
     */
    @PostMapping("/createAlliance")
    @ApiOperation("创建或者加入同盟")
    public BaseResponse<Boolean> createOrJoinAlliance(CardAllianceDTO cardAllianceDTO) {
        Boolean result = cardAllianceService.createOrJoinAlliance(cardAllianceDTO);
        return DongResultUtils.success(result);
    }
}
